﻿using PropertyChanged;
using VIA.Integration;
using VIA.SiMoJi.Domain.Inspection;

namespace VIA.SiMoJi.Domain.Option
{
    [AddINotifyPropertyChangedInterface]
    public class SiMoStationOption
    {

    }

    [Serializable]
    public class SiMoRunniningStatus : RunningStatus
    {
        /// <summary>
        /// 撕膜完成
        /// </summary>
        public bool IsSiMoCompleted { get; set; }
        /// <summary>
        /// 夹爪到抛膜1位置就绪
        /// </summary>
        public bool IsUsingFeeder1 { get; set; }
        /// <summary>
        /// 夹爪到抛膜2位置就绪
        /// </summary>
        public bool IsUsingFeeder2 { get; set; }
        /// <summary>
        /// 飞达1当前步
        /// </summary>
        public int Feeder1Step { get; set; }
        /// <summary>
        /// 飞达2当前步
        /// </summary>
        public int Feeder2Step { get; set; }
        /// <summary>
        /// 每个夹爪上是否有产品
        /// </summary>
        public bool[] HasProducts { get; set; } = new bool[7];
        /// <summary>
        /// 夹爪X轴位置
        /// </summary>
        public double[] JaxAxisesPositions { get; set; } = new double[7];
        /// <summary>
        /// 夹爪气缸状态
        /// </summary>
        public CylinderStates[] JawCylinderStates { get; set; } = new CylinderStates[7];
        /// <summary>
        /// 顶升轴点位
        /// </summary>
        public double DSAxisPositions { get; set; }

        public SiMoRunniningStatus Clone()
        {
            return new SiMoRunniningStatus()
            {
                Name = this.Name,
                Step = this.Step,
                IsSiMoCompleted = this.IsSiMoCompleted,
                IsUsingFeeder1 = this.IsUsingFeeder1,
                IsUsingFeeder2 = this.IsUsingFeeder2,
                Feeder1Step = this.Feeder1Step,
                Feeder2Step = this.Feeder2Step,
                HasProducts = this.HasProducts,
                JaxAxisesPositions = this.JaxAxisesPositions,
                JawCylinderStates = this.JawCylinderStates,
                DSAxisPositions = this.DSAxisPositions,
            };
        }
    }
}